import Table from "../packages/table/index.js";
import TableColumn from "../packages/table-column/index.js";
import InputNumber from "../packages/input-number/index.js";
import Input from "../packages/input/index.js";
import Checkbox from "../packages/checkbox/index.js";
import CheckboxGroup from "../packages/checkbox-group/index.js";
import CheckboxButton from "../packages/checkbox-button/index.js";
import Tag from "../packages/tag/index.js";
import Select from "../packages/select/index.js";
import Option from "../packages/option/index.js";
// import ElementUI from "element-ui";
import "../packages/themes/packages/index.scss";

const components = [
  Table,
  TableColumn,
  InputNumber,
  Input,
  Checkbox,
  CheckboxGroup,
  CheckboxButton,
  Tag,
  Select,
  Option
];
const install = function (Vue) {
  if (install.installed) {return;}
  components.map((component) => {
    Vue.component(component.name, component);
  });
  // Vue.use(ElementUI);
};

if (typeof window !== "undefined" && window.Vue) {
  install(window.Vue);
}

export default {
  version: "1.0.27",
  install,
  Table,
  TableColumn,
  InputNumber,
  Input,
  Checkbox,
  CheckboxGroup,
  CheckboxButton,
  Tag,
  Select,
  Option
};
